package com.zzyl.nursing.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.dto.MemberDto;
import com.zzyl.nursing.service.MemberOrdersService;
import com.zzyl.serve.domain.NursingProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author zzq
 * @Date 2025/10/22 20:34
 */
@RestController
@RequestMapping("/member/orders/project")
public class MemberOrdersController extends BaseController {
    @Autowired
    private MemberOrdersService memberOrdersService;
    @GetMapping("/page")
    public TableDataInfo page(MemberDto memberDto){
        startPage();
        List<NursingProject> list = memberOrdersService.pagequery(memberDto);
        return getDataTable(list);
    }
    @GetMapping("/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        NursingProject project = memberOrdersService.selectNursingProjectById(id);
        return AjaxResult.success(project);
    }


}
